package com.entity;

public class User {

    private String userName;

    private String password;

    private Goods goods;

    public User(){
        System.out.println("调用无参数构造函数。。。。");
    }

    public User(String userName, String password, Goods goods) {
        this.userName = userName;
        this.password = password;
        this.goods = goods;
        System.out.println("调用有参数的构造函数赋值....");
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    @Override
    public String toString() {
        return "User{" +
                "userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", goods=" + goods +
                '}';
    }
}
